The use of networks, including LANs, WANS, and the Internet continues to grow at ever increasing rates. Each day, more and more systems are becoming interconnected. This has created a need for high performance network switches on the part of network service providers. Many of the switches comprise multiple modules, with many data flows between the modules themselves and between the interfaces to external networks. In some cases, these modules, including the processors residing on the modules can be partitioned into virtual routers, that is, software running on the processors that emulates the functioning of an individual physical router. As a result of the combination of hundreds of thousands of data flows for the virtual routers in these network switches, there is a need for efficiently processing packet flows, and for controlling the resources consumed within the network switch.